import {Controller,Resource} from "/lib/WebServer.js"
var request = require('request');


@Service("userService")
export default class  userService{

    add(user){
        console.log("add")
        request({
            url: url,
            method: "POST",
            json: true,
            headers: {
                "content-type": "application/json",
            },
            body: JSON.stringify(requestData)
        }, function(error, response, body) {
            if (!error && response.statusCode == 200) {
            }
        });
      // this.userDao.add(user)
    }


    findById(user,callback){
          this.userDao.findById(user,function (resData) {
              callback(resData);
          });
    }

    findAll(user){
        this.userDao.findAll(user)
    }
    edit(user){
        this.userDao.edit(user);
    }
}
